package com.yehee.chainserver.service;


import com.yehee.chainserver.mapper.EthWalletMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

@Service
public class BalanceService {
    @Autowired
    EthWalletMapper ethWalletMapper;

    @Transactional
    public int addUserEthBanlance(Integer userId, BigDecimal amount){
       return ethWalletMapper.addUserBanlance(userId,amount);


    }
    @Transactional
    public int reduceUserEthBalance(Integer userId,BigDecimal amount){
       return ethWalletMapper.reduceUserBalance(userId,amount);
    }

}
